with Interfaces.C; use Interfaces.C;
with Interfaces.C.Strings;

package SDL_error_h is

  --  arg-macro: procedure SDL_OutOfMemory ()
  --    SDL_Error(SDL_ENOMEM)
  --  arg-macro: procedure SDL_Unsupported ()
  --    SDL_Error(SDL_UNSUPPORTED)
  --    SDL - Simple DirectMedia Layer
  --    Copyright (C) 1997-2006 Sam Lantinga
  --    This library is free software; you can redistribute it and/or
  --    modify it under the terms of the GNU Lesser General Public
  --    License as published by the Free Software Foundation; either
  --    version 2.1 of the License, or (at your option) any later version.
  --    This library is distributed in the hope that it will be useful,
  --    but WITHOUT ANY WARRANTY; without even the implied warranty of
  --    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  --    Lesser General Public License for more details.
  --    You should have received a copy of the GNU Lesser General Public
  --    License along with this library; if not, write to the Free Software
  --    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  --    Sam Lantinga
  --    slouken@libsdl.org
  -- 

  -- Simple error message routines for SDL  
  -- Set up for C function definitions, even when using C++  
  -- Public functions  
   procedure SDL_SetError (fmt : Interfaces.C.Strings.chars_ptr  -- , ...
      );  -- SDL_error.h:37:63
   pragma Import (C, SDL_SetError, "SDL_SetError");

   function SDL_GetError return Interfaces.C.Strings.chars_ptr;  -- SDL_error.h:38:49
   pragma Import (C, SDL_GetError, "SDL_GetError");

   procedure SDL_ClearError;  -- SDL_error.h:39:49
   pragma Import (C, SDL_ClearError, "SDL_ClearError");

  -- Private error message function - used internally  
   subtype SDL_errorcode is unsigned;
   SDL_ENOMEM : constant SDL_errorcode := 0;
   SDL_EFREAD : constant SDL_errorcode := 1;
   SDL_EFWRITE : constant SDL_errorcode := 2;
   SDL_EFSEEK : constant SDL_errorcode := 3;
   SDL_UNSUPPORTED : constant SDL_errorcode := 4;
   SDL_LASTERROR : constant SDL_errorcode := 5;  -- SDL_error.h:51:3

   procedure SDL_Error (code : SDL_errorcode);  -- SDL_error.h:52:58
   pragma Import (C, SDL_Error, "SDL_Error");

  -- Ends C function definitions when using C++  
end SDL_error_h;
